const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')

module.exports = {
    mode: "production",
    entry: {
        index: "./tower/js/index.js"
    },
    output: {
        path: path.resolve(__dirname, "dragoon/static/tower/js"),
        filename: "index.js"
    },
    plugins: [
        new CopyPlugin({
            patterns: [
                {
                    from: __dirname + "/tower/index.html",
                    to: __dirname + "/dragoon/static/tower"
                },
                {
                    from: __dirname + "/tower/css/game.css",
                    to: __dirname + "/dragoon/static/tower/css"
                }
            ]
        })
    ]
}